package ThreadConnection;

public class ThreadWaitNotifyLock1 {

    public static void main(String[] args) throws Exception {

        Object lock = new Object();

        Thread waitThread1 = new Thread(() -> {
            ThreadWait threadWait = new ThreadWait(lock);
            threadWait.testWait();
        });

        Thread waitThread2 = new Thread(() -> {
            ThreadWait threadWait = new ThreadWait(lock);
            threadWait.testWait();
        });

        waitThread1.start();
        waitThread2.start();
    }
}